﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>ButtonEdit 按钮编辑框</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />

    
    <script src="../../scripts/boot.js" type="text/javascript"></script>
    <link href="../../scripts/miniui/themes/blue/skin.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
    html body .searchbox .mini-buttonedit-icon
    {
        background:url(search.gif) no-repeat 50% 50%;
    }
    </style>
</head>
<body>
    <h1>ButtonEdit 按钮编辑框</h1>      
    
    <input id="btnEdit1" class="mini-buttonedit" emptyText="请输入..."  onbuttonclick="onButtonEdit" selectOnFocus="true" />
    
    
    <br /><br />
    <input type="button" value="setValue" onclick="setValue()"/>
    <input type="button" value="getValue" onclick="getValue()"/>    
    <input type="button" value="disable" onclick="disable()"/>
    <input type="button" value="enable" onclick="enable()"/>


    <h1>关闭按钮</h1>      
    <input id="Text1" class="mini-buttonedit" showClose="true" oncloseclick="onCloseClick" />

    <h1>自定义按钮图片</h1>      
    <input class="mini-buttonedit searchbox"   />

    <script type="text/javascript">
        

        function setValue() {
            var t = mini.get("btnEdit1");
            
            t.setValue("usa");
            t.setText("美国");
        }
        function getValue() {
            var t = mini.get("btnEdit1");
            alert(t.getValue() + ":" + t.getText());
        }
        function enable() {
            var t = mini.get("btnEdit1");
            t.enable();
        }
        function disable() {
            var t = mini.get("btnEdit1");
            
            t.disable();
        }
        function onButtonEdit(e) {
            alert("弹出选择");
        }
        function onCloseClick(e) {
            alert("closeclick");
        }
    </script>

    <div class="description">
        <h3>Description</h3>
        <p>ButtonEdit显示为文本按钮的输入框。通过监听处理"buttonclick"事件，可以显示弹出框或下拉框等。</p>
    </div>
</body>
</html>